{* Smarty *}
{include file="header.tpl"}
<script language="javascript" src='{$BASE_HOSTPATH}dr-content/users.js'></script>

<div id="main">
	<!-- Start - 用户列表的显示 -->
	<div id="mainbar-full">
		{include file="sub-header.tpl"}
		
		<div id="search">
			<label for="search_input">请输入要查询的用户名：</label>
			<input type="text" id="search_input" onkeyup="search_user(this.value,'{$is_login}','{$user_id}')"/>
		</div>

	<div id="users">
		<!-- Start - 标签的显示 -->

	{literal}
		<style>
			th, td {
				text-align: left;
				vertical-align: middle;
				padding: 5px;
			}
		</style>
	{/literal}
		<table>
			<tr>
				<th>用户名</th>
				<th>总关注数</th>
				<th>积分</th>
				<th>是否关注？</th>
			</tr>
		{section name=u_ptr loop=$users}
			<tr>
				<td>
					<a href="{$BASE_HOSTPATH}dr-admin/dr-page-userinfo.php?uid={$users[u_ptr].user_id}" title="查看user信息">{$users[u_ptr].username}</a>
				</td>
				<td>{$users[u_ptr].marks_get}</td>
				<td>{$users[u_ptr].points}</td>
				<td>
					<div class='userlisten'>
						{if $is_login && $users[u_ptr].user_id neq $user_id}
							{if $users[u_ptr].is_marked}
								<span><input id='user-{$users[u_ptr].user_id}' class='user-{$users[u_ptr].user_id}' type='button'  value='取消收听' onclick="mark_user('{$users[u_ptr].user_id}',value,'{$is_login}')"/></span>
							{else}
								<span><input id='user-{$users[u_ptr].user_id}' class='user-{$users[u_ptr].user_id}' type='button' value='收听' onclick="mark_user('{$users[u_ptr].user_id}',value,'{$is_login}')"/></span>
							{/if}
						{/if}
					</div>
				</td>
			</tr>
		{/section}
		</table>
	</div>

	<div id="users-search"></div>
	</div>
</div>

{include file="footer.tpl"}
